#pragma once
#include "Rbtree.h"


namespace maomi_9527
{

	template<class K, class V>
	class map
	{
		struct Map
		{
			const K& operator()(const pair<const K, V>& kv)
			{
				return kv.first;
			}
		};
	public:
		typedef typename RBTree<K,  pair<const K, V>, Map>::Iterator iterator;
		typedef typename RBTree<K, pair<K, V>, Map>::const_Iterator const_iterator;
		iterator begin()
		{
			return _t.begin();
		}
		iterator end()
		{
			return _t.end();
		}
		bool insert(const pair<K,V>& kv)
		{
			return _t.Insert(kv);
		}
	private:
		RBTree<K, pair<const K, V>, Map> _t;
	};
}